MuleSoft Accelerator for Salesforce Commerce Cloud icon

MuleSoft Accelerator for Salesforce Commerce Cloud

(0 reviews)

SAP Custom BAPI setup guide - Inventory

The following provides guidance on how to use the custom BAPI code (ZBAPIFM\_MATERIAL\_GET\_DATA) for your SAP instance.

Important: You must complete the following instructions before proceeding to Use case 2 - Inventory.

BAPI custom objects

You must create the following ABAP objects in order to use this custom BAPI, which are described below.

Data elements:

  • ZBAPI_MATERIALDTE_DATE
  • ZBAPI_MATERIALDTE_TIME

Structures

  • ZBAPI_MATERIALSTR_RNG_DATES
  • ZBAPI_MATERIALSTR_RNG_TIME
  • ZBAPISTR_MATERIAL_DATA_IN
  • ZBAPISTR_INVENTORY_DATA_IN
  • ZBAPISTR_MATERIAL_DATA_OUT
  • ZBAPISTR_INVENTORY_DATA_OUT

Table types:

  • ZBAPITTY_MATERIAL_DATA_OUT
  • ZBAPITTY_INVENTORY_DATA_OUT
  • ZBAPI_MATERIALTTY_RNG_DATES
  • ZBAPI_MATERIALTTY_RNG_TIME

Class/interface: (optional, needed to handle exceptions)

  • ZCL_EXCEPTION_HELPER

Function group:

  • ZBAPIFGR_MATERIAL

Data elements

ObjectHow to create
ZBAPI_MATERIALDTE_DATEsfc-b2c-com-bapi_01.png
ZBAPI_MATERIALDTE_TIMEsfc-b2c-com-bapi_02.png

Structures

ObjectHow to create
ZBAPI_MATERIALSTR_RNG_DATESsfc-b2c-com-bapi_03.png
ZBAPI_MATERIALSTR_RNG_TIMEsfc-b2c-com-bapi_04.png
ZBAPISTR_MATERIAL_DATA_INsfc-b2c-com-bapi_05.png
ZBAPISTR_INVENTORY_DATA_INsfc-b2c-com-bapi_06.png
ZBAPISTR_MATERIAL_DATA_OUTsfc-b2c-com-bapi_07.png
sfc-b2c-com-bapi_08.png
ZBAPISTR_INVENTORY_DATA_OUTsfc-b2c-com-bapi_09.png

Table types

ObjectHow to create
ZBAPITTY_MATERIAL_DATA_OUTsfc-b2c-com-bapi_10.png
ZBAPITTY_INVENTORY_DATA_OUTsfc-b2c-com-bapi_11.png
ZBAPI_MATERIALTTY_RNG_DATESsfc-b2c-com-bapi_12.png
ZBAPI_MATERIALTTY_RNG_TIMEsfc-b2c-com-bapi_13.png

Class/Interface

ZCL_EXCEPTION_HELPER

This class is used to handle the BAPI messages. In this case, the method used is S_SYST_TO_RETURN:

sfc-b2c-com-bapi_14.png

sfc-b2c-com-bapi_15.png

Creating a function group

The following describes how to create a function group named ZBAPIFGR_MATERIAL:

  1. Create function module ZBAPIFM_MATERIAL_GET_DATA, using "Remote-enable module" as processing type:

    sfc-b2c-com-bapi_16.png

  2. Complete the import parameters with the following:

    sfc-b2c-com-bapi_17.png

  3. Complete the export parameters with the following:

    sfc-b2c-com-bapi_18.png

  4. Copy and paste the code from ZBAPIFM_MATERIAL_GET_DATA.txt, and then activate it.

  5. Create ZBAPI_MATERIAL_MSG message class with the following messages:

    sfc-b2c-com-bapi_19.png


Reviews

TypeCustom
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onJun 25, 2021
Asset overview

Asset versions for 1.5.x

Asset versions
VersionActions
1.5.1